<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage(Of BookmarkUserViewModel)" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	UserAccount
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="page-header">
        <h2>
        <%=Model.Title%>
        </h2>
    </div>
    <div id="content">
        <div class="formContent">
            <div id="formContent-book">
                <div class="tabs">
                    <ul class="tabNavigation">
                        <li><a href="#profile">User Profile</a></li>
                        <li><a href="#changepassword">Change Password</a></li>
                    </ul>
                    <div id="profile">
                        <% Using Html.BeginForm("UserAccount", "Bookmark")%>
                        <label for="FirstName">
                            FirstName:</label>
                        <%=Html.TextBox("FirstName", Model.CurrentUser.FirstName, New With {.class = "text-field"})%>
                        <%= Html.ValidationMessage("FirstName", "*") %>
                        <label for="LastName">
                            LastName:</label>
                        <%=Html.TextBox("LastName", Model.CurrentUser.LastName, New With {.class = "text-field"})%>
                        <%= Html.ValidationMessage("LastName", "*") %>
                        <label for="LastVisited">
                            LastVisited:<%=Html.Encode(String.Format("{0:g}", Model.CurrentUser.LastVisited))%></label>
                        <%=Html.Hidden("username", Model.CurrentUser.UserName)%>
                        <input type="submit" class="submit" value="Save" />
                        <input type="button" class="submit" value="Cancel" onclick="Javascript:history.back();" />
                        <% End Using%>
                    </div>
                    <div id="changepassword">
                    <% Using Html.BeginForm("ChangePassword", "Bookmark")%>
                     <label for="Currentpassword">
                            Current password:</label>
                        <%=Html.Password("currentPassword", "", New With {.class = "text-field"})%>
                        <%= Html.ValidationMessage("currentPassword") %>
                        <label for="Newpassword">
                          New password</label>
                        <%=Html.Password("newPassword", "", New With {.class = "text-field"})%>
                        <%=Html.ValidationMessage("newPassword")%>
                      <label for="Confirmnewpassword">
                         Confirm new password</label>
                        <%=Html.Password("confirmPassword", "", New With {.class = "text-field"})%>
                        <%= Html.ValidationMessage("confirmPassword") %>
                        
                        <input type="submit" class="submit" value="Change Password" />
                        <input type="button" class="submit" value="Cancel" onclick="Javascript:history.back();" />
    <% End Using%>
                       
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" charset="utf-8">
      $(function() {
      
          var selectedTab =  <%= "'#" +  Model.SelectedTab + "'"%> ;
          var tabContainers = $('div.tabs > div');
          tabContainers.hide().filter(selectedTab).show();
          $('div.tabs ul.tabNavigation a').click(function() {
              tabContainers.hide();
              tabContainers.filter(this.hash).show();
              $('div.tabs ul.tabNavigation a').removeClass('selected');
              $(this).addClass('selected');
              return false;
          }).filter('[href = '+selectedTab+']').click();
      });
	</script> 
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="SideContent" runat="server">
</asp:Content>

